return;
this._logoBin.destroy_all_children();
- if (this._logoFileUri)
+ if (this._logoFileUri) {
+ let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._logoBin.add_child(this._textureCache.load_uri_async(this._logoFileUri,
- -1, _LOGO_ICON_HEIGHT));
+ -1, _LOGO_ICON_HEIGHT,
+ scaleFactor));
+ }
},
_updateLogo: function() {
if (file) {
let uri = file.get_uri();
- iconBox.child = textureCache.load_uri_async(uri, iconBox._size, iconBox._size);
+ let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
+ iconBox.child = textureCache.load_uri_async(uri, iconBox._size, iconBox._size, scaleFactor);
}
else {
iconBox.child = new St.Icon({ icon_name: 'avatar-default',
guint width;
guint height;
+ guint scale;
GSList *textures;
GtkIconInfo *icon_info;
g_assert (data != NULL);
g_assert (data->uri != NULL);
- pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, 1, &error);
+ pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, data->scale, &error);
if (error != NULL)
{
request->policy = policy;
request->colors = colors ? st_icon_colors_ref (colors) : NULL;
request->icon_info = info;
- request->width = request->height = size * scale;
+ request->width = request->height = size;
+ request->scale = scale;
request->enforced_square = TRUE;
load_texture_async (cache, request);
* @uri: uri of the image file from which to create a pixbuf
* @available_width: available width for the image, can be -1 if not limited
* @available_height: available height for the image, can be -1 if not limited
+ * @scale: scale factor of the display
*
* Asynchronously load an image. Initially, the returned texture will have a natural
* size of zero. At some later point, either the image will be loaded successfully
st_texture_cache_load_uri_async (StTextureCache *cache,
const gchar *uri,
int available_width,
- int available_height)
+ int available_height,
+ int scale)
{
ClutterActor *texture;
AsyncTextureLoadData *request;
request->policy = policy;
request->width = available_width;
request->height = available_height;
+ request->scale = scale;
load_texture_async (cache, request);
}